<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body bgcolor="lightblue" >
        <p>{{ cls.name }}班共有{{ student_amount }}位学生，分布在{{ building_amount }}个楼栋{{ room_amount }}间宿舍里</p>
        <table border="1">
            <tr><th>学号</th><th>姓名</th><th>性别</th><th>联系方式</th><th>楼栋名</th><th>房间名</th><th>房间类别</th><th>操作</th></tr>
            {% for student in student_set %}
            <tr><td>{{ student.sno }}</td><td>{{ student.name }}</td><td>{% if student.sex %}男{% else %}女{% endif %}</td><td>{{ student.contact }}</td><td>{{ student.roomid.buildingid.name }}</td><td>{{ student.roomid.name }}</td><td>{{ student.roomid.room_type }}</td><td><a href="{% url 'dorm:instructor__member' student.sno %}">查看寝室成员</a></td></tr>
            {% endfor %}
        </table>
        <a href="{% url 'dorm:instructor__index' %}" >返回</a><br />
    </body>
</html>
